class Storge {
	static getInstance() {
		if (!Storge.instance) {
			Storge.instance = new Storge()
		}
		return Storge.instance
	}

	getItem(key) {
		return localStorage.getItem(key)
	}
	setItem(key, value) {
		return localStorage.setItem(key, value)
	}
}
const storage1 = Storge.getInstance()
const storage2 = Storge.getInstance()

storage1.setItem('nickname', 'cat')
storage1.getItem('nickname')
storage2.getItem('nickname')
console.log(storage1 == storage2);
